<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <title>Gerenciador de Estoque - Cadastro de Insumos</title>
    </h:head>
    <h:body>
        <center>
            <h:form>
                <h:graphicImage id="logo" width="350" height="200" url="http://static.wixstatic.com/media/f3611f_f23a8ea76443e56fddfeca51f456962a.png"/>
                <br/>
                <h:outputText value="Controle de Estoque" style="font-size: 50px; font-style: oblique"/>
                <br/>
                <br/>
                <h:panelGrid columns="2">
                    Nome: <h:inputText id="nome" value="#{insumosBean.in.nome}"/>
                    Quantidade: <h:inputText id="quantidade" value="#{insumosBean.in.quantidade}">
                        <f:ajax render="valorUnidade"/>
                    </h:inputText>
                    Valor de Compra: <h:inputText id="valorCompra" value="#{insumosBean.in.valorCompra}">
                        <f:ajax render="valorUnidade"/>
                    </h:inputText>
                    Valor Unidade: <h:inputText id="valorUnidade" value="#{insumosBean.in.valorPorUnidade}" disabled="true"/>
                    <h:inputHidden/><h:commandButton value="Cadastrar Insumo" action="#{insumosBean.adicionarInsumo}"/>
                </h:panelGrid>
            </h:form><br/>
            <h:form><h:commandLink value="((( Cancelar e Voltar )))" action="index"/></h:form>
        </center>
    </h:body>
</html>

